package com.unknowpupil.sell.exception;

import com.unknowpupil.sell.SellApplication;
import com.unknowpupil.sell.common.enums.ErrorCodeEnum;

/**
 * @Classname: SellException
 * @Author: <a> w10g </a>
 * @CreateDate: Create in 2019/12/30 1:33
 * @Description:
 * @Version: 1.0
 */
public class SellException extends RuntimeException {
    private Integer code;
    public SellException(ErrorCodeEnum errorCodeEnum){
        super(errorCodeEnum.getMsg());
        this.code = errorCodeEnum.getCode();
    }
    public SellException(int code,String msg){
        super(msg);
        this.code = code;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
